package cn.tedu.uep.application.service.impl;

import cn.tedu.uep.application.mapper.ApplicationMapper;
import cn.tedu.uep.application.pojo.dto.ApplicationSaveParam;
import cn.tedu.uep.application.pojo.entity.Application;
import cn.tedu.uep.application.service.ApplicationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
* @author HUAWEI
* 针对表【application】的数据库操作Service实现
* @createDate 2024-12-18 15:06:31
*/
@Service
@Slf4j
public class ApplicationServiceImpl implements ApplicationService{
    @Autowired
    private ApplicationMapper applicationMapper;

    @Override
    public void saveApplication(ApplicationSaveParam applicationSaveParam) {
        log.debug("保存申请单业务{}",applicationSaveParam);
        Application application = new Application();
        BeanUtils.copyProperties(applicationSaveParam,application);
        application.setCreateTime(new Date());
        applicationMapper.saveApplication(application);
    }
}




